<!doctype html>
<html lang="zh-CN" xmlns:th="http://www.thymeleaf.org">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="renderer" content="webkit">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>宾果个人博客</title>
<meta name="keywords" content="">
<meta name="description" content="">
<link rel="stylesheet" type="text/css" href="css/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="css/nprogress.css">
<link rel="stylesheet" type="text/css" href="css/style.css">
<link rel="stylesheet" type="text/css" href="css/font-awesome.min.css">
	<link rel="stylesheet" type="text/css" th:href="@{/js/layui/css/layui.css}"/>

<link rel="apple-touch-icon-precomposed" href="images/icon.png">
<link rel="shortcut icon" href="images/favicon.ico">
<script src="js/jquery-2.1.4.min.js"></script>
<script src="js/nprogress.js"></script>
<script src="js/jquery.lazyload.min.js"></script>
	<script th:src="@{/js/layui/layui.js}" type="text/javascript" charset="utf-8"></script>
<!--[if gte IE 9]>
  <script src="js/jquery-1.11.1.min.js" type="text/javascript"></script>
  <script src="js/html5shiv.min.js" type="text/javascript"></script>
  <script src="js/respond.min.js" type="text/javascript"></script>
  <script src="js/selectivizr-min.js" type="text/javascript"></script>
<![endif]-->
<!--[if lt IE 9]>
  <script>window.location.href='upgrade-browser.html';</script>
<![endif]-->

<!--	<style>
        .layui-laypage a {
			padding: 5px 20px !important;
		}
		.layui-laypage span{
			padding: 5px 20px !important;
		}
	</style>-->
</head>
<body class="user-select">
<header class="header">
<nav class="navbar navbar-default" id="navbar">
<div class="container">
  <div class="header-topbar hidden-xs link-border">
	<ul class="site-nav topmenu">
	  <li><a href="#" >标签云</a></li>
		<li><a href="#" rel="nofollow" >读者墙</a></li>
		<li><a href="#" title="RSS订阅" >
			<i class="fa fa-rss">
			</i> RSS订阅
		</a></li>
	</ul>
			 勤记录 懂分享</div>
  <div class="navbar-header">
	<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#header-navbar" aria-expanded="false"> <span class="sr-only"></span> <span class="icon-bar"></span> <span class="icon-bar"></span> <span class="icon-bar"></span> </button>
	<h1 class="logo hvr-bounce-in"><a href="#" title="宾果个人博客"><img src="images/201610171329086541.png" alt="宾果个人博客"></a></h1>
  </div>
  <div class="collapse navbar-collapse" id="header-navbar">
	<form class="navbar-form visible-xs" action="/Search" method="post">
	  <div class="input-group">
		<input type="text" name="keyword" class="form-control" placeholder="请输入关键字" maxlength="20" autocomplete="off">
		<span class="input-group-btn">
		<button class="btn btn-default btn-search" name="search" type="submit">搜索</button>
		</span> </div>
	</form>
	<ul class="nav navbar-nav navbar-right">
	  <li><a data-cont="宾果个人博客" title="宾果个人博客" href="/">首页</a></li>
	  <li><a data-cont="springboot" title="springboot" href="#" >springboot</a></li>
	  <li><a data-cont="springcloud" title="springcloud" href="#" >springcloud</a></li>
	  <li><a data-cont="资讯分享" title="资讯分享" href="#" >资讯分享</a></li>
	</ul>
  </div>
</div>
</nav>
</header>
<section class="container">
<div class="content-wrap">
<div class="content">
  <div id="focusslide" class="carousel slide" data-ride="carousel">
	<ol class="carousel-indicators">
	  <li data-target="#focusslide" data-slide-to="0" class="active"></li>
	  <li data-target="#focusslide" data-slide-to="1"></li>
	</ol>
	<div class="carousel-inner" role="listbox">
	  <div class="item active">
	  <a href="/" target="_blank" title="宾果个人博客源码" >
	  <img data-original="images/20181225120015.png" width="820px;" height="200px;" src="images/20181225120015.png" alt="宾果个人博客源码" class="img-responsive"></a>
	  </div>
	</div>
	<a class="left carousel-control" href="#focusslide" role="button" data-slide="prev" rel="nofollow"> <span class="glyphicon glyphicon-chevron-left" aria-hidden="true"></span> <span class="sr-only">上一个</span> </a> <a class="right carousel-control" href="#focusslide" role="button" data-slide="next" rel="nofollow"> <span class="glyphicon glyphicon-chevron-right" aria-hidden="true"></span> <span class="sr-only">下一个</span> </a> </div>
  	<article class="excerpt-minic excerpt-minic-index" th:if="${not top.isEmpty()}">
		<h2><span class="red">【推荐】</span><a target="_blank" th:href="@{'/show/'+${top.id}}" th:text="${top.artTitle}" ></a>
		</h2>
		<p class="note" th:text="${top.artDesc}"></p>
	</article>
  <div class="title">
	<h3>最新发布</h3>
	<div class="more">                
			<a href="#" title="springboot" >springboot</a>
			<a href="#" title="springcloud" >springcloud</a>
			<a href="#" title="资讯分享" >资讯分享</a>
		</div>
  </div>
	<div id="pageAct">
		<article class="excerpt excerpt-1" style="padding: 20px;" th:each="entries,stat:${map}">
			<header><a class="cat" th:href="@{'/show/'+${entries['id']}}" th:title="${entries['lableText']}" th:text="${entries['lableText']}"><i></i></a>
				<h2><a th:href="@{'/show/'+${entries['id']}}" th:text="${entries['title']}" target="_blank" th:value="${entries['title']}"></a>
				</h2>
			</header>
			<p class="meta">
				<time class="time" ><i class="glyphicon glyphicon-time"></i><span th:text="${#dates.format(entries['createTime'],'yyyy-MM-dd')}"></span> </time>
				<span class="views" ><i class="glyphicon glyphicon-eye-open"></i> <span th:text="${entries['readCount']}"></span></span>
				<a class="comment" href="##comment" title="评论" target="_blank" th:text="${entries['artComment']}"><i class="glyphicon glyphicon-comment"></i> 4</a>
			</p>
			<p class="note" th:text="${entries['desc']}"></p>
		</article>
	</div>

	<input type="hidden" id="total" th:value="${session.total}">
	<input type="hidden" id="curr" th:value="${curr}">
	<input type="hidden" id="currPage" value="1">
	<div id="test1" style="text-align: center;" ></div>
	<button id="loadMore" class="layui-btn layui-btn-fluid" style="display:block;margin:0 auto; margin-top: 10px; width: 216px; ">加载更多</button>
</div>
</div>
<div class="tlinks">Collect from <a href="http://www.cssmoban.com/" >企业网站模板</a></div>
<aside class="sidebar">
	<div th:replace="right::right"></div>
<div class="widget widget_sentence">
  <h3>友情链接</h3>
  <div class="widget-sentence-link">
	<a href="#" title="网站建设" target="_blank" >网站建设</a>&nbsp;&nbsp;&nbsp;
  </div>
</div>
</aside>
</section>
<footer class="footer">
<div class="container">
<p>Copyright &copy; 2018.Company name All rights reserved.More Templates</p>
</div>
<div id="gotop"><a class="gotop"></a></div>
</footer>
<script src="js/bootstrap.min.js"></script>
<script src="js/jquery.ias.js"></script>
<script src="js/scripts.js"></script>
<script th:src="@{/js/dateutil.js}"></script>
<script>

    layui.use(['layer'] ,function(){
        var layer = layui.layer;
    });

	$(function(){
        $.ajax({
            url: '/hotCommentAct',
            type: 'post',
            dataType: 'json',
            success: function (data) {
                if (data.code === 200) {
                    var msg = data.data;
                    var html = '';
                    for(var i = 0;i < msg.length ;i++) {
                        html+='<li><a title='+msg[i].artTitle+' href=/show/'+msg[i].id+' style="padding: 10px;"><span class="thumbnail"></span>';
                        html+='<span class="text">'+msg[i].artTitle+'</span>';
                        html+='<span class="muted"><i class="glyphicon glyphicon-time"></i>'+getFormatDateByLong(msg[i].createTime,'yyyy-MM-dd')+'</span>';
                        html+='<span class="muted"><i class="glyphicon glyphicon-eye-open"></i>'+msg[i].artReadCount+'</span></a></li>';
                    }
                    $('#commentAct').append(html);
                } else {
                    layer.msg('获取数据失败，请联系管理员 qq:425089032');
                }


            }
        });
	});

	$('#loadMore').bind('click', function(){
        var index = layer.load(1, {
            shade: [0.1,'#fff'] //0.1透明度的白色背景
        });
	    var page = parseInt($('#currPage').val())+1;
        $.ajax({
            url: '/loadMore?page='+page,
            type: 'post',
            dataType: 'json',
            success: function (data) {
                if (data.code === 200) {
                    var msg = data.data;
                    var html = '';
                    for(var i = 0;i < msg.length ;i++) {
                        html+='<article class="excerpt excerpt-1" style="padding: 20px;">';
                        html+='<header><a class="cat" href=/show/'+msg[i].id+' title='+msg[i].lableText+' ><i></i>'+msg[i].lableText+'</a>';
                        html+='<h2><a href=/show/'+msg[i].id+' text='+msg[i].title +' target="_blank" >'+msg[i].title +'</a></h2></header>';
                        html+='<p class="meta">';
                        html+='<time class="time" ><i class="glyphicon glyphicon-time"></i><span>'+getFormatDateByLong(msg[i].createTime,'yyyy-MM-dd')+'</span> </time>';
                        html+='<span class="views" ><i class="glyphicon glyphicon-eye-open"></i> <span>'+msg[i].readCount+'</span></span>';
                        html+='<a class="comment" href="##comment" title="评论" target="_blank" ><i class="glyphicon glyphicon-comment"></i>'+msg[i].artComment+'</a></p>';
                        html+='<p class="note">'+msg[i].desc+'</p>';
                        html+='</article>';

                    }
                    $('#pageAct').append(html);
                    $('#currPage').val(page);
                    layer.close(index);
                } else {
                    layer.msg(data.msg);
                    layer.close(index);
                    return false;
                }


            }
        });
	});

   /* layui.use('laypage', function(){
        var laypage = layui.laypage;

        //执行一个laypage实例
        laypage.render({
            elem: 'test1' //注意，这里的 test1 是 ID，不用加 # 号
			,limit:5
            ,curr:$('#curr').val()
            ,count: $('#total').val()
			,jump: function(obj, first){//数据总数，从服务端得到
                //obj包含了当前分页的所有参数，比如：
                console.log(obj.curr); //得到当前页，以便向服务端请求对应页的数据。


                //首次不执行
                if(!first){
                    window.location.href='/?page='+obj.curr;
                }
            }
        });
    });*/
</script>
</body>
</html>
